<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>百元百鸡</title>
		<script type="text/javascript">
			window.onload(buy());
			function buy() {
				var x;
				var y;
				var z;
				for ( x = 0; x <= 20; x++) {
					for ( y = 0; y < 34; y++) {
						for ( z = 0; z <= 334; z++) {
							if (x + y + z == 100 && 5*x + 3*y + z / 3 == 100) {
								alert("公鸡" + x + "只，母鸡" + y + "只，小鸡" + y + "只");
							}
						}
					}
				}
			}
		</script>
	</head>
	<body>
	</body>
</html>
